import request from '@/utils/request'
import Cookies from 'js-cookie'
export function house() {
    return request({
        url: "/General/get_house",
        method: "post",
        data: ''
    })
}
// 列表
export function getList(data, page) {
    return request({
        url: '/Stock_allot/order_list/' + (page ? page : 1),
        method: 'post',
        data: data
    })
}
// 获取分页
export function getPage(data) {
    return request({
        url: '/Stock_allot/order_page',
        method: 'post',
        data: data
    })
}
// 导出
export function getExport(data) {
    window.location.href = `https://${location.host}/smsi/index.php/Stock_allot/get_excel_back?order_id=${data.order_id}&didixueshengka=${Cookies.get('SMS_AdminToken')}`; 
    // return request({
    //     url: `/machine/get_excel?store_id=${data.store_id}&area_id=${data.area_id}`,
    //     method: 'get',
    //     data:{},
    // })
}
// 列表
export function getinfoList(data) {
    return request({
        url: '/Stock_allot/gift_list',
        method: 'post',
        data: data
    })
}
export function getReturnApplyList(data) {
    return request({
        url: '/Stock_allot/gift_list',
        method: 'post',
        data: data
    })
}
// 提交
export function save(data) {
    return request({
        url: '/Stock_allot/back_edit',
        method: 'post',
        data: data
    })
}
//申请退货提交 
export function returnApplySave(data) {
    return request({
        url: '/Stock_allot/return_goods',
        method: 'post',
        data: data
    })
}
//申请退货提交 
export function getReturnInfoList(data) {
    return request({
        url: '/Stock_allot/return_list',
        method: 'post',
        data: data
    })
}
//退货信息提交
export function returnInfoSave(data) {
    return request({
        url: '/Stock_allot/return_information',
        method: 'post',
        data: data
    })
}